package com.game;

import android.database.Cursor;

public class ViewStepItemActivity extends ViewTableActivity {
	@Override 
	protected void initalize(){
		setContentView(R.layout.dblistmain);
		myTable = "stepItems";
		layoutId = R.layout.viewstepitem;
		TO_ITEM = new int [] { R.id.si_rowId,
				R.id.si_rowGameId, R.id.si_rowChoiceFrom, R.id.si_rowChoiceTo };

	}

	@Override
	protected String getItemName(int Id){
		Cursor nameCursor = myDBAdapter.getStepItemByIdCursor(Id);
		startManagingCursor(nameCursor);
		nameCursor.moveToFirst();
		return 	"From " 
				+ nameCursor.getString(nameCursor.getColumnIndex(DBAdapter.CHOICE_FROM))
				+ " To " 
				+ nameCursor.getString(nameCursor.getColumnIndex(DBAdapter.CHOICE_TO));
	}
}
